export const request=(params)=>{
  const baseUrl="http://47.93.241.187:8000"
  // const baseUrl="http://localhost:8000"
  return new Promise((resolve,reject)=>{
    wx.showLoading({
      title: '拼命加载中',
    })
    wx.request({
      ...params,
       url: baseUrl+params.url,
       success:(result)=>{
         resolve(result.data);
         wx.hideLoading({
          success: (res) => {},
        })
       },
       fail:(err)=>{
         reject(err);
         wx.hideLoading({
          success: (res) => {},
        })
       }
    });
  })
}

